package Decorator;

/**
 * @Author zhangjinxi
 * @Date: Created in 15:36 2018/2/27
 * @Description:
 */
public class Decorator implements Sourceable {

    private Sourceable sourceable;

    public Decorator(Sourceable sourceable) {
        this.sourceable = sourceable;
    }

    @Override
    public void method() {
        System.out.println("before decorator!");
        sourceable.method();
        System.out.println("after decorator!");
    }

}
